<?php

//Iniciar Sesión
session_start();

//Validar si se está ingresando con sesión correctamente
if (!$_SESSION['ID']){
echo '<script language = javascript>
alert("usuario no autenticado")
self.location = "index.html"
</script>';
}
//Proceso de conexión con la base de datos
    $conn = oci_connect("caridad","caridad","localhost/xe");  
    if (!$conn) {
        $e = oci_error();
        trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
    }

$id_usuario = $_SESSION['ID'];

//$stid = oci_parse($conn, "SELECT * FROM usuarios WHERE id='".$id_usuario."'");
$stid = oci_parse($conn, "SELECT * FROM usuarios WHERE id='".$id_usuario."'");
        oci_execute($stid);
         
        while (($row = oci_fetch_array($stid, OCI_BOTH))) {
            // El array asociativo poseerá los índices en mayúsculas
            //echo $row['ID'] . " - " . $row['USUARIO'] . "\n<br/>";

            $usuerId=$row['ID'];
            $usuerLogeado=$row['USUARIO'];
        }
         
        oci_free_statement($stid); //libero la memoria
        oci_close($conn); //cierro la conexión

?>

<!DOCTYPE html>
<html lang="es">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="shortcut icon" href="ico/favicon.ico">

    <title>Titulo</title>

    <!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">

    <!-- Custom styles for this template -->
    <link href="css/navbar.css" rel="stylesheet">

    <!-- Just for debugging purposes. Don't actually copy this line! -->
    <!--[if lt IE 9]><script src="js/ie8-responsive-file-warning.js"></script><![endif]-->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>

  <body>

    <div class="container">

      <!-- Static navbar -->
      <div class="navbar navbar-default" role="navigation">
        <div class="container-fluid">
          <div class="navbar-header">
            <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
              <span class="sr-only">Toggle navigation</span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
              <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">General</a>
          </div>
          <div class="navbar-collapse collapse">
            
            <ul class="nav navbar-nav navbar-right">
              <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown">Hola <b><?php echo $usuerLogeado; ?></b> <span class="glyphicon glyphicon-user"></span></a>
                <ul class="dropdown-menu">
                  <li><a href="perfilgeneral.php">Mi Perfil</a></li>
                  <li class="divider"></li>
                  <li><a href="login/desconectar_usuario.php">Salir</a></li>
                </ul>
              </li>
            </ul>
          </div><!--/.nav-collapse -->
        </div><!--/.container-fluid -->
      </div>

      <!-- Main component -->
      <div class="panel panel-default">
          <!-- Default panel contents -->
        <div align="center" class="panel-heading">
            <form class="form-horizontal" role="form">
             ERES INVITADO
              
            </form>
        </div>
          <div align="center" class="panel-body">
            
            <img src="http://10hotmail.com/wp-content/uploads/2012/05/Agregar-contactos-Yahoo-MSN-Messenger.png">
          </div>
        </div> <!--- End Main component -->

    </div> <!-- /container -->


    <!-- Bootstrap core JavaScript
    ================================================== -->
    <!-- Placed at the end of the document so the pages load faster -->
    <script src="js/jquery.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
  </body>
</html>
